<script>

export default {
  name: 'MainCard1',
  props: [
    'shu'
  ],
  computed: {},
  methods: {
    todetail () {
      this.$router.push({
        name: 'detail',
        params: {
          bowenid: this.shu.id
        }
      })
    }
  }
}
</script>

<template>

  <el-card class="box-card" :body-style="{ padding: '0px' }" @click.native="todetail">
    <div class="card1">
      <div class="c1">
        <img :src="shu.imgurl" alt="" class="img"></div>
      <div class="text">
        <div> {{ shu.title }}</div>
      </div>
    </div>
  </el-card>
</template>

<style scoped lang="scss">
$bgd: rgba(0, 0, 0, 0.5);
$hoverbgd: rgba(0, 0, 0, 0.7);
$textcol: white;
.box-card {
  box-sizing: border-box;
  border: 2px solid #003153;
  padding: 5px;
  height: 250px;
  //width: 670px;
  transition: all .5s;
  border-radius: 30px;
  background-color: $bgd;
  overflow: hidden;
  margin: 5px;
  @media (max-width: 1415px) {
    margin: 1px;
  }
  @media (max-width: 767px) {
    height: 150px;
    margin-bottom: 10px;
  }

  .card1 {
    display: flex;
    align-items: center;
    //justify-content: space-between;

    .c1 {
      border-radius: 30px;
      overflow: hidden;
      height: 236px;
      width: 375px;
      @media (max-width: 1400px) {
        &.c1 {
          width: 25vw;
        }
      };
      @media (max-width: 767px) {
        &.c1 {
          height: 136px;
          width: 40vw;
        }
      }
    }

    .img {
      width: 375px;
      transition: all .5s;
      height: 236px;
      @media (max-width: 1400px) {
          width: 25vw;
      }
      @media (max-width: 767px) {
          height: 136px;
          width: 40vw;
      }
    }

    .img:hover {
      transform: scale(1.05);
    }
  }

  &:hover {
    box-shadow: 5px 5px 5px #003153;
    background: $hoverbgd;
    transform: scale(0.95);
    cursor: pointer;
    border: 2px solid $hoverbgd;
  }
}

.text {
  font-size: 14px;
  font-weight: bold;
  color: $textcol;
  margin-left: 50px;
}
</style>
